home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / 8bit / cislib_a / breake.lst < prev    next >
File List  |  1995-04-22  |  935b  |  34 lines

  1. 1 REM FILE BREAKER-UPPER 
  2. 2 REM By: Michael Reichmann 01/02/85 
  3. 3 REM Simple demo program. 
  4. 4 REM You need to know the number of 
  5. 5 REM sectors in the file that you 
  6. 6 REM want to break up. This is a 
  7. 7 REM quick and dirty example of how 
  8. 8 REM to break a larger file into 
  9. 9 REM two smaller ones. 
  10. 10 ? CHR$(125):TRAP 150:POSITION 15,2:? "-BREAKER-":?  
  11. 11 DIM FILE$(12):LOOP=75 
  12. 12 ? "Enter source file name,(D:...)" 
  13. 14 INPUT FILE$:?  
  14. 16 ? "Enter # of sectors in file." 
  15. 18 INPUT SIZE:? :? "Creating FILE.1" 
  16. 19 ? "Processing...":?  
  17. 20 OPEN #1,4,0,FILE$ 
  18. 22 OPEN #2,8,0,"D:FILE.1" 
  19. 25 GOSUB LOOP:? :? "Creating FILE.2":?  
  20. 40 OPEN #2,8,0,"D:FILE.2" 
  21. 45 GOSUB LOOP 
  22. 50 CLOSE #1:? :? "Finished.":END  
  23. 75 FOR X=1 TO (SIZE*125)/2 
  24. 80 GET #1,BYTE 
  25. 85 PUT #2,BYTE 
  26. 88 ? CHR$(BYTE); 
  27. 90 NEXT X 
  28. 95 CLOSE #2:?  
  29. 100 RETURN  
  30. 150 IF PEEK(195)=136 THEN GOTO 50:REM End of file found. 
  31. 155 CLOSE #1:CLOSE #2 
  32. 160 ? "ABORTED TERMINATION" 
  33.  
  34.